home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / wheel2 / maple / wheelg.f < prev   
Text File  |  1999-09-16  |  884b  |  33 lines

  1. c      
  2. c     SUBROUTINE wheelg
  3. c      
  4.       subroutine wheelg(n,k,uf,vf,wf,xx)
  5.         implicit double precision (t)
  6.         doubleprecision uf(n,k),vf(n,k),wf(n,k)
  7.         doubleprecision uu,vv,ww,r
  8.         integer n,k,i1,i2
  9.         doubleprecision xx(8,k)
  10.         data r / 1.0/
  11. c         
  12.         do 1000, i1 =1,n ,1
  13. c           
  14.           do 1001, i2 =1,k ,1
  15.             cs1 = cos(xx(1,i2))
  16.             cs2 = cos(xx(2,i2))
  17.             si1 = sin(xx(1,i2))
  18.             si2 = sin(xx(2,i2))
  19.             uu = xx(7,i2)+r*(cs2*cs1*uf(i1,i2)-si1*vf(i1,i2)+si2*cs1*wf(
  20.      +i1,i2))
  21.             vv = xx(8,i2)+r*(cs2*si1*uf(i1,i2)+cs1*vf(i1,i2)+si2*si1*wf(
  22.      +i1,i2))
  23.             ww = r*si2+r*(-si2*uf(i1,i2)+cs2*wf(i1,i2))
  24.             uf(i1,i2) = uu
  25.             vf(i1,i2) = vv
  26.             wf(i1,i2) = ww
  27.  1001     continue
  28. c         
  29.  1000   continue
  30. c       
  31.         return
  32.       end
  33.